package br.com.financeiro.controllers;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Component;

import br.com.financeiro.dominio.Conta;
import br.com.financeiro.services.CrudService;

@Component
@Scope("session")
public class ContaMBean extends CrudMBean<Conta> {
	
	public ContaMBean() {
		obj = new Conta();
	}

	@Override
	protected String getDir() {
		return "/pages/conta";
	}
	
	@Autowired
	protected void setService(CrudService<Conta> service) {
		super.setService(service);
	}
	
	@Override
	@Secured("ROLE_USER")
	public String novo() {
		return super.novo();
	}

}
